package com.example.sample.Infrastructure.Thread;

import java.util.concurrent.Callable;

public class TestCallable implements Callable<String> {

    public TestCallable(){}

    private String Name;

    public TestCallable(String name){
        this.Name =name;
    }

    @Override
    public String call(){
        int num = 0;

        for (int i = 0; i < 10; i++) {
            num++;
        }

        StringBuilder builder =new StringBuilder();
        builder.append("名称:"+Name+",");
        builder.append("结果:"+num);
        return builder.toString();
    }
}
